package com.base.util.jniutils.log;

/**
 * Created by gj on 16-2-2.
 */
public class JniLogConfig {
    // 日志总开关
    public static boolean getLogOn() {
        return NATIVE_GET_LOG_ON();
    }

    public static void setLogOn(boolean logOn) {
        NATIVE_SET_LOG_ON(logOn);
    }

    // 日志默认是否打开
    public static boolean getLogOnDefault() {
        return NATIVE_GET_LOG_ON_DEFAULT();
    }

    public static void setLogOnDefault(boolean logOnDefault) {
        NATIVE_SET_LOG_ON_DEFAULT(logOnDefault);
    }

    public static String getLogTagDefault() {
        return NATIVE_GET_LOG_TAG_DEFAULT();
    }

    public static void setLogTagDefault(String logTagDefault) {
        NATIVE_SET_LOG_TAG_DEFAULT(logTagDefault);
    }

    public static void unitTesting() {
        NATIVE_UNIT_TESTING();
    }

    private static native boolean NATIVE_GET_LOG_ON();

    private static native void NATIVE_SET_LOG_ON(boolean logOn);

    private static native boolean NATIVE_GET_LOG_ON_DEFAULT();

    private static native void NATIVE_SET_LOG_ON_DEFAULT(boolean logOnDefault);

    private static native String NATIVE_GET_LOG_TAG_DEFAULT();

    private static native void NATIVE_SET_LOG_TAG_DEFAULT(String logTagDefault);

    private static native void NATIVE_UNIT_TESTING();
}
